// Product 接口
interface Product {
    void operation();
}

// ProductA 和 ProductB 类
class ProductA implements Product {
    public void operation() {
        System.out.println("ProductA operation");
    }
}

class ProductB implements Product {
    public void operation() {
        System.out.println("ProductB operation");
    }
}

// SimpleFactory 类
class SimpleFactory {
    public Product createProduct(String type) {
        if (type == null) return null;
        if (type.equalsIgnoreCase("A")) {
            return new ProductA();
        } else if (type.equalsIgnoreCase("B")) {
            return new ProductB();
        }
        return null;
    }
}

// 测试类
public class SimpleFactoryTest {
    public static void main(String[] args) {
        SimpleFactory factory = new SimpleFactory();
        Product productA = factory.createProduct("A");
        productA.operation();
        
        Product productB = factory.createProduct("B");
        productB.operation();
    }
}